package com.suarte.webapp.action;

import org.appfuse.service.GenericManager;

import java.io.Serializable;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: Gcastillo
 * Date: Mar 10, 2011
 * Time: 7:18:08 PM
 * To change this template use File | Settings | File Templates.
 */
public class GuaranteeList extends BasePage implements Serializable {
    private GenericManager guaranteeManager;

    public void setGuaranteeManager(GenericManager guaranteeManager) {
        this.guaranteeManager = guaranteeManager;
    }

    public GuaranteeList() {
        setSortColumn("id"); // sets the default sort column
    }

    public List getGuarantees() {
        return sort(guaranteeManager.getAll());
    }
}
